<?php


namespace app\api\controller\v1;


use app\api\service\UserToken;
use app\api\vaildate\TokenGet;

class Token
{
    /*
     * 获取令牌
     * @url /token/user
     * @method POST
     */
    public function getToken($code)
    {
        (new TokenGet())->goCheck();
        $ut = new UserToken($code);
        $token = $ut->get();
        return ['token' => $token];
    }
}